<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>新闻管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all"/>
    <link rel="stylesheet" href="__CSS__/admin.css" media="all">
    <style type="text/css">

        /* tooltip */
        #tooltip {
            position: absolute;
            border: 1px solid #ccc;
            background: #333;
            padding: 2px;
            display: none;
            color: #fff;
        }
    </style>
</head>
<body style="padding:10px;">
<div class="tplay-body-div">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">新闻列表管理</li>
            <li><a href="{:url('admin/kc/index_add')}" class="a_menu">添加新闻</a></li>
        </ul>
    </div>
    <form class="layui-form serch" action="{:url('admin/article/index')}" method="post">
    </form>
    <table class="layui-table" lay-size="sm">
        <colgroup>
            <col width="10">
            <col width="40">
            <col width="350">
            <col width="50">
            <col width="50">
            <col width="80">
        </colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>内容</th>
            <th>排序</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="info" id="vo"}
        <tr>
            <td>{$vo.kc_id}</td>
            <td>{$vo.title}</td>
            <td>{$vo.kc_text}</td>
            <td>{$vo.kc_sort}</td>
            <td>{$vo.kc_time}</td>
            <td class="operation-menu">
                <div class="layui-btn-group">
                    <a href="{:url('admin/kc/index_update',['id'=>$vo.kc_id])}">
                        <button class="layui-btn">修改</button>
                    </a>
                    <a href="{:url('admin/kc/index_delect',['id'=>$vo.kc_id])}">
                        <button class="layui-btn">删除</button>
                    </a>
                </div>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    {$page}
    {include file="public/foot"}
    <script type="text/javascript">
        $('.delete').click(function () {
            var id = $(this).attr('id');
            layer.confirm('确定要删除?', function (index) {
                $.ajax({
                    url: "{:url('admin/about/delete')}",
                    data: {id: id},
                    success: function (res) {
                        layer.msg(res.msg);
                        if (res.code == 1) {
                            setTimeout(function () {
                                location.href = res.url;
                            }, 1500)
                        }
                    }
                })
            })
        })
    </script>
</div>
</body>
</html>
